export class InfoCollectionRule {
  constructor(required, infoCollectionEl) {
    this.asyncValidator = (rule, info) => {
      if (!required) return Promise.resolve();

      if (!info) {
        return infoCollectionEl.show();
      } else {
        return Promise.resolve();
      }
    };
  }
}
